package services

import (
	"permange/dao"
	"permange/models"
)

func Getdepartment() (error, []models.Department) {
	departmentData,err  := dao.Selectdepartment()
	return err, departmentData
}
func Getdepartment_e(edepartment string) ([]models.Employee,error)  {
	employee, err:= dao.Selectdepartment_e(edepartment)
	return employee,err
}
func Updatedepartment(department models.Department) error{
	err:= dao.Updatedepartment(department)
	return err
}

func Adddepartment(department models.Department) error {
	err := dao.Adddepartment(department)
	return err
}

func Deldepartment(id string) error {
	err := dao.Deletedepartment(id)
	return err
}